﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using UDS.Components;
using UDS.Entity;

namespace UDS.SubModule.UnitiveDocument.Task
{
    /// <summary>
    /// Listview 的摘要说明。
    /// </summary>
    public partial class TaskListPage : Page
    {
        protected override void OnLoad(EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Bangding();
            }
        }

        private void Bangding()
        {
            dgMyTask.DataSource = Project.GetProjects(SiteContext.Current.UserName);
            dgMyTask.DataBind();
        }

        protected void DataGrid_PageChanged(object sender, DataGridPageChangedEventArgs e)
        {
            dgMyTask.CurrentPageIndex = e.NewPageIndex;
            Bangding();
        }
    }
}